﻿Imports Sy.Data
Imports Sy.UI.Common
Public Class SenderInfo
    Inherits JsonObject(Of SenderInfo)
    Public Sub New() : End Sub
    Public Sub New(account As String, password As String, mailType As MailType, successCount As Integer, failCount As Integer, allCount As Integer, lastSendTime As Date)
        Me.Account = account
        Me.Password = password
        Me.MailType = mailType
        Me.SuccessCount = successCount
        Me.FailCount = failCount
        Me.AllCount = allCount
        Me.LastSendTime = lastSendTime
    End Sub
    Public Account As String
    Public Password As String
    Public MailType As MailType
    Public SuccessCount As Integer
    Public FailCount As Integer
    Public AllCount As Integer

    Public ReadOnly Property UIMailType As String
        Get
            Return MailType?.Name
        End Get
    End Property
    Public ReadOnly Property UITime As String
        Get
            If LastSendTime.Ticks = 0 Then
                Return "未发送邮件"
            Else
                Return Sy.DataTimeFormat.Default(LastSendTime)
            End If
        End Get
    End Property
    Public LastSendTime As Date
End Class
